package JavaClass.demo02;

public class Test {
    public static void main(String[] args) {
        try {
            Employee emp1 = new Employee(1, 20, "张三");
            emp1.setSalaryAndId(800, "123456789012345678");
            emp1.addSalary(100);
            emp1.minusSalary(50);

            Employee emp2 = new Employee(2, 25, "李四");
            emp2.setSalaryAndId(900, "234567890123456789");
            emp2.addSalary(150);
            emp2.minusSalary(80);

            Employee emp3 = new Employee(3, 30, "王五");
            emp3.setSalaryAndId(1000, "345678901234567890");
            emp3.addSalary(200);
            emp3.minusSalary(100);

            Employee.showTotalEmployee();
            Employee.showTotalSalary();
        } catch (AgeLowException | AgeHighException | EmptyException | SalaryLowException | SalaryHighException e) {
            System.out.println("异常信息: " + e.getMessage());
        }
    }
}
